New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent adjacent inline elements not separated by whitespace. #1155
Prevent adjacent inline elements not separated by whitespace. #1155
Conversation
… not separated by whitespace
fc3405c
to
1d54da5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this would not warn with {' '}
(ie, explicit whitespace)? Could we add some tests for that?
e82018c
to
6479675
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've addressed the feedback, added support for CallExpressions, and added a doc file.
|
||
} | ||
return { | ||
JSXElement: function(node) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure how to get this working with React.createElement()
, thought I'd figure it out after getting some feedback.
6479675
to
982a0a1
Compare
4cc3ac9
to
0d7019b
Compare
FYI, this is my first time writing an eslint rule.
I wrote this because I want to be warned when I have adjacent inline elements without any whitespace, as it affects the way the page looks when unstyled, and may affect the way search engines see the page.
Let me know if you think any changes are needed. If this is something you're interested in merging I'll add the related docs.